<template>
	<view>
		<view class="live-shop">
			<view class="buycar" @click="open">
				<image src="../../static/image/buycar2.png" mode=""></image>
			</view>
			<uni-popup ref="popup" type="bottom" >
				<view class="chose">
					<scroll-view scroll-x="true" @scroll="scroll" class="scroll-view-H">
					<view class="list">
						<view v-for="(item,index) in shopList" :key="index" class="scroll-view-item_H ">
						<view class="demo">
							<view class="demo-img">
							</view>
							<view class="demo-name">
								<text>{{item.name}}</text>
							</view>
							<view class="demo-num">
								<text>￥{{item.money}}</text>
								<view class="addcar">
									<image src="../../static/image/buycar1.png" mode=""></image>
								</view>
							</view>
						</view>
					</view>
					</view>
					
				</scroll-view>
				<view class="submit">
					<view class="submit-img">
						<image src="../../static/image/buycar2.png" mode=""></image>
					</view>
					<text>提交预约</text>
				</view>
				</view>
				
			</uni-popup>
		</view>
	</view>
</template>

<script>
	import uniPopup from '@/components/uni-popup/uni-popup.vue'
	import uniPopupMessage from '@/components/uni-popup/uni-popup-message.vue'
	import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
	export default {
		components: {
			uniPopup,
			uniPopupMessage,
			uniPopupDialog
		},
		data() {
			return {
				shopList: [{
						name: '绿宝石钻石项链',
						money: '414,000'
					},
					{
						name: '时来运转戒指',
						money: "24,600"
					},
					{
						name: 'SUNLIGHT坠饰',
						money: '154,000'
					}
				],
				scrollLeft: 0,
				old: {
					scrollLeft: 0
				}
			}
		},
		methods: {
			open() {
				this.$refs.popup.open()
			},
			scroll: function(e) {
				console.log(e)
				this.old.scrollLeft = e.detail.scrollleft
			},
		}
	}
</script>

<style scoped>
	.buycar{
		position: absolute;
		bottom: 20rpx;
		left: 20rpx;
	}
	.buycar image {
		width: 44rpx;
		height: 34rpx;
	}

	.live-shop {
		width: 100%;
	}

	.demo {
		/* width: 300rpx; */
		width: 240rpx;
		height: 276rpx;
		background-color: #0F0F10;
		display: flex;
		flex-direction: column;
		padding-left: 30rpx;
		align-items: center;
	}

	.demo-img {
		width: 240rpx;
		height: 160rpx;
		background-color: #FFFFFF;
	}

	.demo-name {
		height: 40rpx;
		line-height: 40rpx;
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		width: 96%;
	}

	.demo-num {
		display: flex;
		justify-content: space-between;
		width: 96%;
	}

	.demo-num>text {

		font-size: 28rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #E9A932;
	}

	.addcar image {
		width: 32rpx;
		height: 32rpx;
	}

	.submit {
		display: flex;
		width: 92%;
		height: 100rpx;
		justify-content: space-between;
		align-items: center;
		padding-left: 30rpx;
	}

	.submit-img {
		width: 72rpx;
		height: 72rpx;
		background: #26262C;
		border-radius: 100px;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.submit-img>image {
		width: 44rpx;
		height: 34rpx;
	}

	.submit>text {
		width: 240rpx;
		height: 72rpx;
		background: linear-gradient(142deg, #CAA022 0%, #E09926 100%);
		border-radius: 36rpx;
		text-align: center;
		line-height: 72rpx;
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
	}
	.list{
		display: flex;
	}
	.scroll-view-H{
		width: 100%;
	}
	.list{
		width: 160%;
		display: flex;
	}
	.chose{
		width: 100%;
		background-color: #0F0F10;
	}
</style>
